package huanfuan.demo.design;

import huanfuan.demo.design.ICouponDiscount;

import java.math.BigDecimal;

/**
 * @Author huanfuan
 * @Date 2022/1/10 12:00
 * @Version 1.0
 */
public class Context<T> {

       private ICouponDiscount<T> couponDiscount;

       public Context(ICouponDiscount<T> couponDiscount) {
              this.couponDiscount = couponDiscount;
       }

       public BigDecimal discountAmount(T couponInfo, BigDecimal skuPrice) {
              return couponDiscount.discountAmount(couponInfo, skuPrice);
       }



}
